<html>
<head>
<title>TIVTC</title>
<link rel="stylesheet" type="text/css" href="../../avisynth.css">
<!--
Automatically generated, don't change:
$Id: tivtc.htm,v 1.1 2005/07/10 16:11:01 wilbertd Exp $ 
-->
</head>
<body>
<h1>TIVTC</h1>
<h2>Abstract</h2>
<b>author:</b>    tritical
<br><b>version:</b>        0.9.9.3<br>
<b>download:</b>   <a href="http://bengal.missouri.edu/~kes25c/">http://bengal.missouri.edu/~kes25c/</a>
<br><b>category:</b>    Deinterlacing &amp; Pulldown Removal
<br><b>requirements:</b>&nbsp;
<ul>
  <li>YV12 &amp; YUY2 Colorspace</li>
</ul>

<p><b>license:</b> GPL</p>

<hr size=2 width="100%" align=center>

<!-- #EndTemplate -->
<h2>Description
</h2>
<p>       TIVTC is actually a combination of 3 different filters and 1 conditional function.
</p>
<p>The three filters included are TFM, TDecimate, and MergeHints.  TFM is a field matching
filter that will recreate the original progressive frames in a telecined source, and TDecimate&nbsp;<br>
   is a decimation filter that removes duplicates.  These filters can be used together to achieve   an ivtc or separately to accomplish other tasks.  TDecimate also provides special options&nbsp;<br>
   for handling hybrid material which include vfr via matroska (using a timecodes file).   The conditional function is IsCombedTIVTC which can be used via
AviSynth's conditionalfilter&nbsp;<br>
   to test if frames are combed or not.  It simply uses TFM's combed frame detection.  The third
normal filter called MergeHints is mainly a utility function that allows denoising and other<br>
   types of filters to be used inbetween TFM and TDecimate and for TFM's hints to still be passed
to TDecimate.
</p>
<p>For more info about using each of the filters consult the individual readme files.
</p>
<p>current filter versions:
</p>
<p><a href="tivtc_tfm.htm">TFM</a>:      TFM is a field matching filter that recovers the original progressive frames from a   telecined stream.  It does not decimate the resulting duplicate frames though, so to   achieve an ivtc you must follow TFM with a decimation filter such as TDecimate(), which   is also included in the
tivtc.dll.
</p>
<p><a href="tivtc_tdecimate.htm">TDecimate</a>: TDecimate is a decimaton filter intended to remove duplicates from a video
stream.  It supports a couple types of operation which include M-in-N decimation
and an arbitrary framerate decimation scheme that can support ratios not achievable
with M-in-N. It also includes special handling for hybrid material such as blend decimation (for a single frame rate solution) or vfr via mkv using a timecodes
file.
</p>
<p><a href="tivtc_mergehints.htm">MergeHints</a>:      MergeHints is a simple filter that transfers hints present in one clip into   another.  It will work with any filter that uses the method of hiding hints in   the least significant bit of the first 64 pixels in the Y plane of the image   (decomb, dgdecode, tfm, etc...).&nbsp;
</p>
<p><a href="tivtc_fielddiff.htm">FieldDiff</a>:      FieldDiff is a simple filter that calculates a field difference metric using the   5 point metric that TFM uses and then outputs it via the debug or display options. It   operates on full frames (it differences the two fields in each frame). FieldDiff has   a version that can be used in conditional filtering called "CFieldDiff" it returns the   value to the script.
</p>
<p><a href="tivtc_iscombedtivtc.htm">IsCombedTIVTC</a>: TIVTC is a utility function that can be used with AviSynth's conditionalfilter.   It uses TFM's inbuilt combed frame detection to test whether or not a frame is   combed and returns true if it is and false if it isn't.
</p>
<p>contact:   forum.doom9.org, nick = tritical,  or  email: kes25c at mizzou.edu
</p>
<h2>Examples
</h2>
<p>      This file lists some example scripts for dealing with common cases for which you would use   TIVTC.  It assumes, however, that you have at least skimmed over the README's and know the   different parameters.  It also assumes you know what "hybrid" and "vfr" mean, what an mkv   timecodes file is and how to use it if you are looking into hybrid processing.  All examples   assume we are using an mpeg2source()... and use TFM's d2v parameter to obtain the field order   and scan for illegal transitions in the d2v file.  If you are not using a d2v source then adjust   the examples as necessary to meet your requirments.
</p>
<h3>NTSC cases:
</h3>
<p>1.) NTSC Film, normal source (not anime or cartoon).  One pass.
</p>
<pre>mpeg2source(&quot;c:\oursource.d2v&quot;)
tfm(d2v=&quot;c:\oursource.d2v&quot;)
tdecimate()</pre>
<p>2.) NTSC Film, anime or cartoon source.  One pass.
</p>
<pre>mpeg2source(&quot;c:\oursource.d2v&quot;)
tfm(d2v=&quot;c:\oursource.d2v&quot;)
tdecimate(mode=1)</pre>
<p>3.) NTSC Hybrid, using blend decimation on video sections (not anime or cartoon).  One pass.
</p>
<pre>mpeg2source(&quot;c:\oursource.d2v&quot;)
tfm(d2v=&quot;c:\oursource.d2v&quot;)
tdecimate(hybrid=1)</pre>
<p>4.) NTSC Hybrid, using blend decimation on video sectons, anime or cartoon source.  One pass.
</p>
<pre>mpeg2source(&quot;c:\oursource.d2v&quot;)
tfm(d2v=&quot;c:\oursource.d2v&quot;)
tdecimate(mode=1, hybrid=1)</pre>
<p>5.) NTSC Hybrid, using vfr via mkv (not anime or cartoon).  One pass.
</p>
<pre>mpeg2source(&quot;c:\oursource.d2v&quot;)
tfm(d2v=&quot;c:\oursource.d2v&quot;)
tdecimate(mode=3, hybrid=2, vfrDec=0, mkvOut=&quot;mkv-timecodesfile.txt&quot;)</pre>
<p>6.) NTSC Hybrid, using vfr via mkv, anime or cartoon source.  One pass.
</p>
<pre>mpeg2source(&quot;c:\oursource.d2v&quot;)
tfm(d2v=&quot;c:\oursource.d2v&quot;)
tdecimate(mode=3, hybrid=2, vfrDec=1, mkvOut=&quot;mkv-timecodesfile.txt&quot;)</pre>
<p>7.) NTSC, two pass (enables use of conCycleTP parameter) mkv vfr for hybrid source.
</p>
<p>First pass:
</p>
<pre>mpeg2source(&quot;c:\oursource.d2v&quot;)
tfm(d2v=&quot;c:\oursource.d2v&quot;, output=&quot;matches.txt&quot;)
tdecimate(mode=4, output=&quot;metrics.txt&quot;)</pre>
<p>Second pass (not anime or cartoon):
</p>
<pre>mpeg2source(&quot;c:\oursource.d2v&quot;)
tfm(d2v=&quot;c:\oursource.d2v&quot;, input=&quot;matches.txt&quot;)
tdecimate(mode=5, hybrid=2, vfrDec=0, input=&quot;metrics.txt&quot;, tfmIn=&quot;matches.txt&quot;, mkvOut=&quot;mkv-timecodesfile.txt&quot;)</pre>
<p>Second pass (anime or cartoon):
</p>
<pre>mpeg2source(&quot;c:\oursource.d2v&quot;)
tfm(d2v=&quot;c:\oursource.d2v&quot;, input=&quot;matches.txt&quot;)
tdecimate(mode=5, hybrid=2, vfrDec=1, input=&quot;metrics.txt&quot;, tfmIn=&quot;matches.txt&quot;, mkvOut=&quot;mkv-timecodesfile.txt&quot;) </pre>
<h3>PAL Cases:
</h3>
<p>1.) PAL, no decimation (just field matching)
</p>
<pre>mpeg2source(&quot;c:\oursource.d2v&quot;)
tfm(d2v=&quot;c:\oursource.d2v&quot;)</pre>
<p>2.) PAL, decimate 1 in 25 (most similar)
</p>
<pre>mpeg2source(&quot;c:\oursource.d2v&quot;)
tfm(d2v=&quot;c:\oursource.d2v&quot;)
tdecimate(cycle=25)</pre>
<p><kbd>$Date: 2005/07/10 16:11:01 $</kbd>
</p>
</body>
</html>
